<?php
class Zendvn_View_Helper_AddpostUser {
	
	protected $_view;
	function setView($view)
	{
	$this->_view = $view;
	}
	public function addPostUser()
	{
		$acl = new Default_Model_Acl();
		$identity = Zend_Auth::getInstance()->getIdentity();
		
		if( $acl->isAllowed( $identity['Role'] ,'posts','add') )
		{
			$loginUrl = $this->_view->linkTo('posts/add');
			$string = '<a href="'. $loginUrl . '">ADD POST</a>';
		}
		return $string;
	}
}